import { UserSimpleInfo } from "./user";

/**
 * 教练中心数据接口
 */
export interface CoachCenterData {
  coachInfo?: CoachItem;
  membershipExpiry: string;
  balance: number;
  unconfirmedStudents: number;
}

/**
 * 教练预约数据接口
 */
export interface CoachReservationData {
  interviewCount: number;
  subjectTwoCount: number;
  subjectThreeCount: number;
}

/**
 * 教练统计数据接口
 */
export interface CoachStatData {
  views: number;
  consultationCount: number;
  dealCount: number;
  yesterdayViews: number;
  yesterdayConsultationCount: number;
  yesterdayDealCount: number;
  baseRank: number;
  cityRank: number;
  nationalRank: number;
}

/**
 * 教练统计数据接口
 */
export interface CoachStatData {
  views: number;
  consultationCount: number;
  dealCount: number;
  yesterdayViews: number;
  yesterdayConsultationCount: number;
  yesterdayDealCount: number;
  baseRank: number;
  cityRank: number;
  nationalRank: number;
}

export interface CoachItem {
  id: number;
  username: string;
  avatar: string;
  age?: number;
  phone?: string;
  gender?: string;
  experience_years?: number;
  skill?: string;
  licenses?: string[];
  score?: number;
  rating?: number;
  title?: string;
  tags?: string[];
  students?: number;
  video?: string;
  native?: string;
  school?: string;
  certificate?: string;
  work_start_time?: string;
  work_end_time?: string;
}

/**
 * 教练详细信息接口
 */
export interface CoachDetailItem extends CoachItem {
  native?: string;
  school?: string;
  is_full?: boolean;
  mouth_student?: number;
  year_student?: number;
  mouth_graduate?: number;
  year_graduate?: number;
  student_total?: number;
  graduate_total?: number;
  complaints?: number;
  description?: string;
  specialties?: string[];
}

/**
 * 教练价格套餐接口
 */
export interface CoachPriceItem {
  id: number;
  name: string;
  price: number;
  runtime?: number;
  description?: string;
  license: string;
}

/**
 * 评论附件接口
 */
export interface CommentAttachmentItem {
  id: number;
  type: string;
  image: string;
}

/**
 * 评论点赞信息接口
 */
export interface CommentFavoriteDataItem {
  id: number;
  comment_id: number;
  user_id: number;
  created_at: string;
}

/**
 * 教练评论/回复参数接口
 */
export interface CommentReplyParamterItem {
  coachId: number;
  content: string;
  parentId?: number;
  commentId?: number;
  attachments?: CommentAttachmentItem[];
  score?: number;
}

/**
 * 教练评论点赞接口
 */
export interface CoachCommentFavoriteItem {
    coach_id: number;
    comment_id: number;
    content?: string;
    parent_id?: number;
    status: number;
}

/**
 * 教练评论信息接口
 */
export interface CoachCommentItem {
    id: number;
    is_edit: boolean;
    coach_id: number;
    user_id: number;
    content: string;
    score: number;
    favorite: number;
    dislike: number;
    answer: number;
    updated_at?: string;
    created_at: string;
    has_attachments: boolean;
    has_reply: boolean;
    has_favorite: boolean;
    has_dislike: boolean;
    attachments: CommentAttachmentItem[];
    user: UserSimpleInfo,
    parent_id?: number;
    reply_count: number,
    reply?: CoachCommentItem[]
}

/**
 * 热门教练接口
 */
export interface HotCoachItem {
    id: number;
    mouth_student: number;
    year_student: number;
    mouth_graduate: number;
    year_graduate: number;
    student_total: number;
    graduate_total: number;
}

/**
 * 预约应用结果接口
 */
export interface AppointApplyResultSchema {
  success: boolean;
  message: string;
  data?: any;
}

/**
 * 工作时间接口
 */
export interface WorkTimeItem {
  start_time: string;
  end_time: string;
  work_days: number[];
}

export interface CommentAttachmentParamterItem {
    commentId: number,
    imageId: number,
}
